package day05;

public class getMaxOfArray {
    /*public static void main(String[] args) {
        int[] arr = {1, 2, 3, 4, 5};
        int max = getMaxOfArray(arr);
        System.out.println(max);

    }
    public static int getMaxOfArray(int[] arr) {
        int max = arr[0];
        for (int i = 1; i < arr.length; i++) {
            if (arr[i] > max) {
                max = arr[i];
            }
        }
        return max;
    }*/
    public static void main(String[] args) {
        int[] arr = {12, 3213, 412, 42, 12};
        printArratData(arr);
    }
    public static void printArratData(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }
}
